const express =require("express");
const app=express();

const teacherLogin=require("./data/teacher_login.json")
const managerLogin=require("./data/manager_login.json")
const studentLogin=require("./data/student_login.json")

const url=require("url")

app.get("/login",(req,res)=>{
    const user=url.parse(req.url,true).query.user;
    if(user==='manager'){
        res.send(managerLogin)
    }
    // if(user==='teacher'){
    //     res.send(teacherLogin)
    // }
    else {
        res.send(studentLogin)
    }
})


app.listen(3300,()=>{
    console.log('服务器运行在3300')
})
